---
id: assoc_controls
title: Executing Controls
sidebar_label: Controls
slug: /api/master/association/controls
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

You can construct arbitrary sequences of binary and analog output headers using a builder class. You can then send these commands to a particular outstation using the association id.


<Tabs
groupId="language"
defaultValue="Rust"
values={[
{label: 'Rust', value: 'Rust'},
{label: 'C', value: 'C'},
{label: 'C++', value: 'C++'},
{label: 'Java', value: 'Java'},
{label: 'C#', value: 'C#'},
]}>
<TabItem value="Rust">

```rust
{{#include ../dnp3/examples/master.rs:assoc_control}}
```

</TabItem>
<TabItem value="C">

```c
{{#include ../ffi/bindings/c/master_example.c:assoc_control_callback}}

{{#include ../ffi/bindings/c/master_example.c:assoc_control}}
```

</TabItem>
<TabItem value="C++">

```cpp
{{#include ../ffi/bindings/c/master_example.cpp:assoc_control_callback}}

{{#include ../ffi/bindings/c/master_example.cpp:assoc_control}}
```

</TabItem>
<TabItem value="Java">

```java
{{#include ../ffi/bindings/java/examples/src/main/java/io/stepfunc/dnp3/examples/MasterExample.java:assoc_control}}
```

</TabItem>
<TabItem value="C#">

```csharp

{{#include ../ffi/bindings/dotnet/examples/master/Program.cs:assoc_control}}
```

</TabItem>
</Tabs>

Calling `operate` begins an asynchronous operation that will complete successfully or with an error code.

The request will only succeed if the outstation returns `CommandStatus.Success` for each of the requested controls.

Consult the language-specific documentation for the meaning of each error code.